package dawnland03.model.entity;

import dawnland03.model.item.ItemType;
import dawnland03.model.entity.attribute.PhysicalAttribute;
import dawnland03.model.entity.attribute.Position;
import dawnland03.model.team.Team;

/**
 * An object implementing this entity will store all the infos related to an entity (id, attributes, and so on).
 *  The actions will be made via an EntityBrain
 * User: Petru Obreja (obrejap@yahoo.com)
 * Date: Jan 18, 2010
 * Time: 10:16:25 PM
 */
public interface Entity{
    /**
     *
     * @return the unique id of the entity
     */
    Integer getId();

    /**
     *
     * @return the position informations of the entity
     */
    Position getPosition();

    /**
     *
     * @param itemType the type of the item
     * @return the current quantity of that item type
     */
    Integer peekItemType(ItemType itemType);

    /**
     *
     * @param itemType the type of the item
     * @param quantity the quantity of the item
     * @throws IllegalStateException if quantity < 0
     * @return add the given quantity to the amount of items of item type, which are hold
     */
    Integer putItemType(ItemType itemType, Integer quantity);

    /**
     *
     * @param physicalAttribute the physicalAttribute
     * @return the current value of that physicalAttribute
     */
    Double peekPhysicalAttribute(PhysicalAttribute physicalAttribute);

    /**
     * This method increased the given physicalAttribute with a value equal with the 'gain' attribute.
     * If 'gain' is negative, nothing happens.
     *
     * @param physicalAttribute the physicalAttribute
     * @param gain the gain in this physicalAttribute
     * @return the current value of that physicalAttribute
     */
    Double increasePhysicalAttribute(PhysicalAttribute physicalAttribute, Double gain);

    /**
     *
     * @return the team of the entity
     */
    Team getTeam();

    /**
     * This method returns an EntitySnapshot of this entity.
     *
     * @return an EntitySnapshot of this entity
     */
    EntitySnapshot getEntitySnapshot();   
}
